var TeachFlow01 = cc.Class.extend({
	step:0,
	flow:null,
	scene:null,
	tip:null,
	tip_frame:null,
	arr:null,
	flash:null,
	over_flag: false,
	ctor: function(scene){
		this.scene=scene;
	},
	init: function(tip, tip_frame, flash, arr){
		this.tip = tip;
		this.arr = arr;
		this.flash = flash;		
		for(var i in teach_flow){
			teach_flow[i].finish = false;
			teach_flow[i].cur = false;
			teach_flow[i].id = i - -1;
		}
		this.tip_frame = tip_frame;
		
	},
	start:function(){
		this.over_flag = false;
		this.step = 0;
	},
	over:function(){
		this.over_flag = true;
		this.flow = over;
		this.scene.over();
	},
	next:function(){
		if(this.over_flag){
			return;
		}
		if(this.flow!=null){
			this.flow.cur = false;
		}
		this.flow = teach_flow[this.step++];
		this.flow.cur = true;
		if(this.flow.tip != null){
			this.tip.doTip(this.flow.id + "." + this.flow.tip);
		}
		if(this.flow.flash != null){
			this.flash.doFlash(this.flow.flash);
		}
		this.location();
		if(this.step > teach_flow.length - 1){
			this.over();
		}
		synch_listener = true;
	},
	getStep:function(){
		return this.step;
	},
	tipColorBack:function(){
		this.flow.cur=false;
	},
	location:function(){
		var tag = this.flow.tag;
		this.curSprite = ll.run.runSpriteSheet.getChildByTag(tag);
		if(this.curSprite == null){
			this.curSprite = ll.run.getChildByTag(tag);
		}
		if(this.curSprite == null){
			this.curSprite = ll.run.lamp.getChildByTag(tag);
		}
		if(this.curSprite == null){
			this.curSprite = ll.run.atomic2.getChildByTag(tag);
		}
		if(this.curSprite == null){
			this.curSprite = ll.run.air_lite.getChildByTag(tag);
		}
		if(this.curSprite == null){
			this.curSprite = ll.run.getChildByTag(TAG_AAWIN_ROOT).getChildByTag(tag);
		}
		if(!!this.curSprite){
			ll.tip.arr.pos(this.curSprite, this.flow.arr_tip_x, this.flow.arr_tip_y);
		}
	}
});
// 任务流
teach_flow = [
      {TAG_RUN_BEAKER:true,tag:TAG_RUN_BEAKER,tip:"进行标准样品1设置：设置标样1浓度为0。"},
      {TAG_RUN_BEAKER2:true,tag:TAG_RUN_BEAKER2,tip:"进行标准样品2设置：设置标样2浓度为0.5。",flash:"放入溶剂量50mL、溶质量0ug"},
      {TAG_RUN_BEAKER3:true,tag:TAG_RUN_BEAKER3,tip:"进行标准样品3设置：设置标样3浓度为1.0。",flash:"放入溶剂量50mL、溶质量25ug"},
      {TAG_RUN_BEAKER4:true,tag:TAG_RUN_BEAKER4,tip:"进行标准样品4设置：设置标样4浓度为2.0。",flash:"放入溶剂量50mL、溶质量50ug"},

      {TAG_RUN_ATOMIC:true,tag:TAG_RUN_ATOMIC,arr_tip_x:0.1,tip:"点击“光谱仪主机”的左部，来到光谱仪侧面，",flash:"放入溶剂量50mL、溶质量100ug"},
      {TAG_RUN_ATOMIC:true,tag:TAG_ATOMIC_PART,arr_tip_x:0.3,tip:"点击圆盘，打开灯位",flash:"来到光谱仪侧面"},
      {TAG_RUN_ATOMIC:true,tag:TAG_LIGHT_CA,tip:"点击选择钙阴极灯,安装阴极灯",flash:"灯位已打开"},
      {TAG_RUN_ATOMIC:true,tag:TAG_ATOMIC_PART,arr_tip_x:0.3,tip:"点击圆盘，关闭灯位",flash:"钙阴极灯已安装"},
      {TAG_ATOMIC_OPEN:true,tag:TAG_ATOMIC_OPEN,tip:"点击红色按钮，打开阴极灯电源。"},
      {TAG_RUN_ATOMIC_P:true,tag:TAG_RUN_ATOMIC_P,arr_tip_x:0.4,arr_tip_y:0.5,tip:"点击蓝色盖子，打开“光谱仪”。"},
	  
      {TAG_HOST_OPEN:true,tag:TAG_HOST_OPEN,tip:"点击电脑主机上的电源按钮，电脑启动"},
      {TAG_RUN_COMPER:true,tag:TAG_RUN_COMPER,tip:"点击电脑桌面，启动AAWin软件，进入原子分析软件登录界面；"},
      {TAG_AAWIN_YIQI:true,tag:TAG_AAWIN_YIQI,tip:"点击仪器"},
      {TAG_AAWIN_YIQI:true,TAG_AAWIN_ELAMP:true,tag:TAG_AAWIN_ELAMP,tip:"选择元素灯；打开元素灯选择界面"},
      
      {TAG_AAWIN_NEXT:true,tag:TAG_AAWIN_NEXT,tip:"选择Ca为工作灯；点击下一步"},
      {TAG_AAWIN_NEXT:true,tag:TAG_AAWIN_NEXT,tip:"设置元素测试参数；点击下一步"},
      {TAG_AAWIN_PEAK:true,tag:TAG_AAWIN_PEAK,tip:"设置波长；点击寻峰"},
      {TAG_AAWIN_PEAK:true,tag:TAG_AAWIN_PEAK,tip:"波长扫描/寻峰；点击寻峰"},
      {TAG_AAWIN_CLOSE:true,tag:TAG_AAWIN_CLOSE,tip:"寻峰结束；点击关闭"},
      {TAG_AAWIN_NEXT:true,tag:TAG_AAWIN_NEXT,tip:"波长设置完成,点击下一步"},
      {TAG_AAWIN_FINISH:true,tag:TAG_AAWIN_FINISH,tip:"设置完成，点击完成"},
      
      {TAG_AAWIN_YIQI:true,tag:TAG_AAWIN_YIQI,tip:"点击仪器"},
      {TAG_AAWIN_YIQI:true,TAG_AAWIN_CELIANG:true,tag:TAG_AAWIN_CELIANG,tip:"选择测量方法，进入测量方法设置界面"},
      {TAG_AAWIN_SURE:true,tag:TAG_AAWIN_SURE,tip:"选择“火焰吸收测量方法”,点击确定完成"},
      {TAG_AAWIN_YIQI:true,tag:TAG_AAWIN_YIQI,tip:"点击仪器"},
      {TAG_AAWIN_YIQI:true,TAG_AAWIN_RANSHAO:true,tag:TAG_AAWIN_RANSHAO,tip:"选择燃烧器参数，进入燃烧器参数设置界面"},
      {TAG_AAWIN_SURE:true,tag:TAG_AAWIN_SURE,tip:"参数默认即可，点击确定完成"},
      
      {TAG_AAWIN_PARAM:true,tag:TAG_AAWIN_PARAM,tip:"点击参数，设置测量参数"},
      {TAG_AAWIN_INFO:true,tag:TAG_AAWIN_INFO,tip:"测量次数选3次，测量方式选“自动”，点击信息处理"},
      {TAG_AAWIN_SURE:true,tag:TAG_AAWIN_SURE,tip:"计算方式选“连续”，积分时间“0.5秒”，滤波系数选“1”,点击确定结束参数设置"},
      
      {TAG_AAWIN_SAMPLE:true,tag:TAG_AAWIN_SAMPLE,tip:"点击样品，进入样品设置向导"},
      {TAG_AAWIN_NEXT:true,tag:TAG_AAWIN_NEXT,tip:"校正方法选“标准曲线”，曲线房产为“一次[A]=K1[C]+KO”,点击下一步"},
      {TAG_AAWIN_NEXT:true,tag:TAG_AAWIN_NEXT,tip:"分别输入4个样品的浓度0，0.5，1.0，2.0,点击下一步"},
      {TAG_AAWIN_NEXT:true,tag:TAG_AAWIN_NEXT,tip:"火焰法，此处默认设置，点击下一步"},
      {TAG_AAWIN_FINISH:true,tag:TAG_AAWIN_FINISH,tip:"输入“重量系数”，“体积系数”，“稀释比率”和“校正系数”，点击完成"},
      
      {TAG_RUN_AIR:true,tag:TAG_RUN_AIR,arr_tip_x : 0.8,arr_tip_y : 0.8,tip:"点击空气压缩机,"},
      {TAG_AIR_OPEN:true,tag:TAG_AIR_OPEN,tip:"点击黑色按钮，打开空气压缩机"},
      {TAG_AIR_VALVE:true,tag:TAG_AIR_VALVE,tip:"转动调压阀，直到压力为0.2-0.25Mpa"},
      {TAG_RUN_GAS:true,tag:TAG_RUN_GAS,arr_tip_y : 0.6,tip:"点击气瓶柜，打开气瓶柜的门"},
      {TAG_GAS_RUNNER:true,tag:TAG_GAS_RUNNER,tip:"调节乙炔阀门，直到出口压力为0.05-0.07Mpa"},
      {TAG_RUN_COMPER:true,tag:TAG_RUN_COMPER,tip:"点击电脑，回到AAWin软件"},
      {TAG_AAWIN_FIREUP:true,tag:TAG_AAWIN_FIREUP,tip:"点击点火按钮，待火焰预热5分钟后，开始测量 "},
      
      {TAG_AAWIN_ENERGY:true,tag:TAG_AAWIN_ENERGY,tip:"观看状态栏能量值，不在100%，双击状态栏，进入“能量调试”"},
      {TAG_AAWIN_EAUTO:true,tag:TAG_AAWIN_EAUTO,tip:"点击自动能量平衡，进行能量调试"},
      {TAG_AAWIN_ECLOSE:true,tag:TAG_AAWIN_ECLOSE,tip:"完成能量调试，点击关闭 "},
      {TAG_AAWIN_TEST:true,tag:TAG_AAWIN_TEST,tip:"点击工具条上的测量，出现测量对话框"},
      
      {TAG_RUN_BEAKER5:true,tag:TAG_RUN_BEAKER5,tip:"把空白液移到“光谱仪主机”， "},
      {TAG_AAWIN_ZERO:true,tag:TAG_AAWIN_ZERO,tip:"点击调零， "},
      {TAG_AAWIN_START:true,tag:TAG_AAWIN_START,tip:"点击开始 "},
      {TAG_RUN_BEAKER:true,tag:TAG_RUN_BEAKER,tip:"把标样1移到“光谱仪主机”"},
      {TAG_AAWIN_START:true,tag:TAG_AAWIN_START,tip:"点击开始"},
      {TAG_RUN_BEAKER2:true,tag:TAG_RUN_BEAKER2,tip:"把标样2移到“光谱仪主机”"},
      {TAG_AAWIN_START:true,tag:TAG_AAWIN_START,tip:"点击开始"},
      {TAG_RUN_BEAKER3:true,tag:TAG_RUN_BEAKER3,tip:"把标样3移到“光谱仪主机”"},
      {TAG_AAWIN_START:true,tag:TAG_AAWIN_START,tip:"点击开始"},
      {TAG_RUN_BEAKER4:true,tag:TAG_RUN_BEAKER4,tip:"把标样4移到“光谱仪主机”"},
      {TAG_AAWIN_START:true,tag:TAG_AAWIN_START,tip:"点击开始"},
      
      {TAG_GAS_RUNNER:true,tag:TAG_GAS_RUNNER,tip:"关闭乙炔"},
      {TAG_RUN_AIR:true,tag:TAG_RUN_AIR,arr_tip_x : 0.8,arr_tip_y : 0.8,tip:"点击空气压缩机,"},
      {TAG_AIR_OPEN:true,tag:TAG_AIR_OPEN,tip:"点击黑色按钮,关闭空压机"},
      
      {tag:null,tip:"恭喜过关",over:true},
];
over = {tip:"恭喜过关"};



